// Reading characters using the next method of a Scanner object
import java.util.Scanner;

public class ReadCharacters2 {
    public static void main(String[] args) {
    	char ch1, ch2;
        Scanner kbScanner = new Scanner(System.in);
        System.out.println("Enter the first character: ");
        ch1 = kbScanner.next().charAt(0);
        System.out.println("Enter the second character: ");
        ch2 = kbScanner.next().charAt(0);
        System.out.println("It is " + (ch1 == ch2) + " that " + ch1 + " equals " + ch2 + ".");
    }
}
